//
//  VIPLiveVideoManager.h
//  TTProduct
//
//  Created by My mac on 2018/8/20.
//  Copyright © 2018年 TTProduct. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "VIPBaseVideoManager.h"
#import "VIPVideoCanvasView.h"
#import "VIPRoomModel.h"

NS_ASSUME_NONNULL_BEGIN

@interface VIPLiveVideoManager : NSObject

+ (instancetype)shareManager;
- (void)bindingRoomInfo:(VIPRoomModel *)room;

@property (copy, nonatomic) LiveLocalWillJoin localWillJoin;
// 本地已经进入回调
@property (copy, nonatomic) LiveLocalDidJoined localDidJoined;
// 本地重新进入回调
@property (copy, nonatomic) LiveLocalDidReJoined localReJoined;
// 本地第一帧回调
@property (copy, nonatomic) LiveFirstVideoDecoded localFirstVideoDecoded;

// 远端进入回调
@property (copy, nonatomic) LiveRemoteDidJoined remoteDidJoined;
// 远端第一帧回调
@property (copy, nonatomic) LiveFirstVideoDecoded remoteFirstVideoDecoded;

// 视频(关闭/打开)回调
@property (copy, nonatomic) LiveDidStreamMuted didVideoMuted;
// 音频(关闭/打开)回调
@property (copy, nonatomic) LiveDidStreamMuted didAudioMuted;

@property (copy, nonatomic) LiveVideoNetworkQuality videoNetworkQuality; // 视频质量回调
@property (copy, nonatomic) LiveAudioVolumeIndication audioVolumeIndication; // 音频质量回调

// 有用户离开
@property (copy, nonatomic) LiveDidOffline remoteDidOffline;
// Token已经失效
@property (copy, nonatomic) LiveTokenDidFailure tokenDidFailure;

// 进入房间
- (void)joinLiveVideo:(NSView *)localView;
// 切换助教/ 老师
- (void)switchRole;

// 退出房间
- (void)quitLiveVideo:(LiveQuitRoom)quitLiveVideoEvent;

// 切换视频分辨率(大流/小流)
- (void)setRemoteVideoStream:(NSUInteger)uid type:(VIPVideoStreamType)type;

// 本地视频采集 (NO:打开/ YES:关闭)
- (void)enableLocalVideoStream:(BOOL)open;

// 本地视频推流 (NO:打开/ YES:关闭)
- (void)pushLocalVideoStream:(BOOL)muted;
// 本地音频推流 (NO:打开/ YES:关闭)
- (void)pushLocalAudioStream:(BOOL)muted;

// 远端视频拉流个人 (NO:打开/ YES:关闭)
- (void)pullRemoteVideoUID:(NSUInteger)uid muted:(BOOL)muted;
// 远端音频拉流个人 (NO:打开/ YES:关闭)
- (void)pullRemoteAudioUID:(NSUInteger)uid muted:(BOOL)muted;

// 远端视频拉流全部 (NO:打开/ YES:关闭)
- (void)pullRemoteVideoStreamAll:(BOOL)muted;
// 远端音频拉流全部 (NO:打开/ YES:关闭)
- (void)pullRemoteAudioStreamAll:(BOOL)muted;

// 设置美颜效果选项
- (void)setBeautyEffect:(BOOL)enable;

// iPhone
#if TARGET_OS_IPHONE
// 切换前置摄像头
- (void)switchCamera;
#endif

// 屏幕共享
// 全屏
- (int)sharedFullScreen;
// 指定窗口
- (int)sharedScreenWindowId:(NSUInteger)windowId;

- (int)stopScreenCapture;

@end

NS_ASSUME_NONNULL_END
